//如何在express中使用模板引擎 
let express = require('express');
const nunjucks = require('nunjucks');
const path = require('path');
let app = express();
nunjucks.configure(path.resolve('view'),{
    autoescape:true,
    express:app//这个参数其实是在向app里注入渲染模板的方法
});
app.get('/',function(req,res){
  //render方法其实是express自己就有
  res.render('user.html',{name:'zhufengjiagou'});
});
app.listen(8080);
